The present invention concerns the field of allocating or assigning modems from one or more modem banks to a plurality of software applications requiring a modem. More specifically, the invention concerns a system and method that segregates the functional components of modems and delays the allocation of a data pump to a software application until a point when the software application requires a physical modem.
Computer software applications use modems by issuing a series of commands to the modem often called the xe2x80x9cAT Command setxe2x80x9d (such as xe2x80x9cATandVxe2x80x9d or xe2x80x9cATDT 555-1234xe2x80x9d). When a software (client) application opens a communication port to a modem, it expects an immediate, near-zero-latency connection to the modem. When a modem processes a command issued by the software application, it provides a response (such as xe2x80x9cOKxe2x80x9d or xe2x80x9cERRORxe2x80x9d) to the application. Upon the processing of a command, a modem may also modify its internal state or it may initiate an action, such as dialing or hanging up a modem call.
FIG. 1 shows one common, prior art configuration by which a modem is interfaced with a software application. In this configuration, the software application 10 allocates a modem by opening a communications port 14 (COM port) provided by the computer""s operating system 12. The COM port 14 is directly attached to a modem 18 via a direct connection 16, such as a cable or bus interface. The software application 10 then interacts with the modem 18 beginning with the first modem command that is issued by the software application 10. In this case, the type of modem needed is known and application-to-modem timing issues are non-existent.
Another well-known, prior art, configuration for interfacing a modem to a software application utilizes a xe2x80x9cstatic modem allocatorxe2x80x9d. Such a configuration, as shown in FIG. 2, is prevalent with modern client-server systems, where one or more client computers 20 communicate with a network server 30 over a computer network 28, such as a local area network (LAN). In this configuration, the COM port 14 of the configuration of FIG. 1 is replaced by a xe2x80x9cvirtual COM portxe2x80x9d 26. Thus, instead of opening a physical COM port and allocating a physical modem, the software application 22 of this configuration opens a virtual COM port 26 provided by the operating system 24.
In this configuration, the direct modem connection is replaced by several components that allow the application to use any one of a number of modems that are attached to the network server 30. These components include the LAN 28, which provides a communications link between the client computer 20 and the network server 30. The server 30 has a simple modem allocator 32 that selects an available modem from a set of modems 34a-n before a first modem command is issued by the software application.
As in the direct attachment configuration, once an available modem is allocated to the software application 22 by the modem allocator 32, the software application 22 interacts with a specific physical modem 34 beginning with the first modem command. This is the method widely used by today""s modem-sharing server systems and related software. Again in this configuration, a physical modem is allocated and timing issues are minimal.
However, there are situations where the selection of a modem will depend, in large part, on information contained in commands issued by a software application subsequent to the first command. This means that some portion of the interaction of the application with a modem must occur before the specific modem to be allocated can be chosen and selected.
For example, a modem command issued by a software application may indicate that the application requires a specific type of modem (e.g. a fax modem, analog modem or an ISDN modem). If not all of the available modems are of the required type, then a modem cannot be allocated until after the specific type is identified.
In addition, with the increased use of large scale computer networks, such as the Internet, there are situations where available modems may be geographically dispersed in order to take advantage of low cost network-based data transmission over great distances and only utilize more costly public switched telephone network (PSTN) lines where they are more cost effective to use and/or necessary (i.e. for local telephone connections between the computer running the software application and the large scale computer network and/or the large scale computer network and an ultimate destination). In such situations, a final modem command may be a dial command, and it is only at that time that a modem can be selected utilizing a least-cost routing or other similar algorithm.
In addition, by waiting until the dial command is issued, the load on the large scale computer network will be minimized until a modem is actually required. In other words, the software application does not need to access a physical modem until it performs an operation that requires interaction with the PSTN. Before that point, it only serves to increase system load to allocate a modem when, in fact, the software application does not require it.
However, delaying the point at which an actual modem is allocated to a software application creates several additional problems that must be addressed. First, modem commands modify the internal state of a modem incrementally. In other words, at any point in time, a modem""s current state is the result of a series of commands that it has received in a specific order. Software applications also expect to receive immediate and certain responses from a modem upon the issuance of certain commands. Therefore, if a modem has not been assigned to a software application to receive and respond to commands issued by the software application, the application will, in most instances, report an error condition and may not initialize properly.
Also, if a modem is not allocated to an application until a later point in time, then, even if the software application does not detect an error, the allocated modem may not be in the required state to accept additional commands from a software application subsequent to the allocation of the modem to the application.
Accordingly, what is needed is a system and method of allocating modems to software applications that is compatible with the delayed allocation of modems. Such a system and method must be able to accurately determine and maintain a proper desired state of a modem at the time of modem allocation and provide the required responses to various software applications with the proper timing sequence upon the issuance of response-requiring modem commands.
The present invention provides a system and method of delayed modem assignment which overcome the problems associated with delaying the allocation or assignment of a physical modem to a specific software application until one is ultimately required, i.e. upon the issuance of a dial-out command.
The present invention introduces a new modem architecture wherein the two major components included in all current modems, i.e. the modem controller and the data pump, are separated. The system of the present invention provides a modem controller closely coupled to the software application to control and account for the effects of modem controller timing issues between the modem controller and the software application. Preferably, the modem controller is implemented in software running on the same computer running the software application. The system distributes a plurality of data pumps, which can be assigned or allocated to a modem controller at an optimum point in time so as to promote operational efficiency.
In order to properly assign or allocate a data pump to a modem controller, the system of the present invention also includes a delayed data pump allocator, which receives a data pump allocation request issued by a modem controller and which selects a best fit data pump to allocate to the requesting modem controller from a set of available data pumps.
The delayed modem allocation system also includes a data pump initializer, which obtains modem command information from the requesting modem controller and which initializes a selected data pump to a proper, desired state. Once initialized, the selected data pump is assigned to the requesting modem controller and the modem controller directly controls the functioning of the assigned data pump.
The method of the present invention begins by segregating the two functional components of a typical modemxe2x80x94the modem controller and the data pump. The modem controller functionality, i.e. the control of the interaction of the modem with a computer, is performed by a local modem controller, which is preferably implemented in software running on the same computer that is running a software application that will ultimately require a modem connection. The data pump functionality, i.e. the management of sending and/or receiving data over a telephone line, is provided by one of a plurality of distributed data pumps that communicate with a modem controller over a network such as the Internet.
When the software application begins interacting with a modem, the modem controller handles the initial interaction. However, when the interaction between the software application and the modem controller progresses to a point where the software application requires that the modem controller issue a xe2x80x9cdialxe2x80x9d or other similar xe2x80x9cconnectxe2x80x9d command, the modem controller will then issue a data pump allocation request to a data pump allocator. The allocation request will include all of the information necessary to initialize a data pump and index the assigned data pump to a current state that matches the state expected by the software application.
When the data pump allocator receives an allocation request, it will then search a data pump table managed by the data pump allocator and select a best fit data pump to allocate to the modem controller issuing the data pump allocation request. Once selected, data pump will be properly initialized and indexed to the expected state by a data pump initializer.
Once the data pump has been initialized, the data pump allocator will connect the allocated data pump to the requesting modem controller at which point in time the modem controller will take over all control of the allocated data pump until the software application indicates that the data pump is no longer required. At that point in time, the connection between the modem controller and the data pump will be terminated and the terminated data pump will once again be available for allocation to a requesting modem controller by the data pump allocator.